<?php
include "includes/db.php";
$mysqli = new MossCMS();

if ($_SESSION[$prefix.'_username'] == ""){  header("Location: login.php"); exit;}

$in_id = (int)$_GET['id'];
$menu_info = $mysqli->menu_info($in_id);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Moss, Inc - Portal</title>
<link href="includes/sw_orig.css" rel="stylesheet" type="text/css" media="screen" />
<link href="includes/local.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="container">
  <div id="header">
  <?php include "includes/header.php"; ?>
	</div>


<div id="mainContent" class="frontpage">
<h1><?php echo $menu_info['menu_name'];?></h1>
<br>

<ul>
<?php	
	$menu_links = $mysqli->menu_link_list($in_id);
      	for($y=0; $y < sizeof($menu_links); $y++) {

						$menu_id 	= $menu_links[$y]["menulink_id"];
						$menu_name	= $menu_links[$y]["menulink_link_name"];
						$menu_url	= $menu_links[$y]["menulink_link_url"];
						?>
						<li><a href="<?php echo $menu_url;?>"><?php echo $menu_name;?></a></li>
	<?php } ?>

</ul>
	  
            
		<div class="clear"></div>	

 
<div id="footer">
	<?php include "includes/footer.php"; ?>
</div>
<!-- end #container --></div>

<br />
</body>
</html>
